<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>搜索</title>
		<style type="text/css">
			div{
				height: 1000px;
			}
			p{
				background-color:gainsboro ;
				border: 1px solid red;
			}
		</style>
	<script type="text/javascript" src="js/jquery-1.12.4 (1).js" ></script>
		<script type="text/javascript">
			$(function(){
				$(window).scroll(function(){
				var s=$(window).scrollTop();		
				$("p").css({"position":"fixed","top":"0","width":"80% "})		
			});
			});
		</script>
	</head>
	<body>
		<div >	
			<p><input type="text" name="sousuo" value="请输入要搜索的内容" />搜索</p>
		</div>
	</body>
</html>